package com.bdqn.t313.cglibdynamicproxy;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class IntermediaryMethodInterceptor implements MethodInterceptor {


    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
        System.out.println("代课老师开始抽查作业===========================》");
        Object feedback = proxy.invokeSuper(obj,args);
        System.out.println("代课老师结束代课=============================》");
        return feedback;
    }
}
